package com.infore.airsupervise.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.beardedhen.androidbootstrap.font.FontAwesome;
import com.infore.airsupervise.R;
import com.infore.airsupervise.utils.DialogUtil;
import com.infore.airsupervise.utils.ToastUtil;
import com.rey.material.app.DialogFragment;
import com.rey.material.app.SimpleDialog;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 创建计划界面
 */
public class InspectPlanCreateActivity extends BaseTitleBarActivity {

    @BindView(R.id.tv_plan_create_pushObject)
    TextView tvPushObject;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_inspect_plan_create);
        ButterKnife.bind(this);
        intTitleBar();
    }

    private void intTitleBar(){
        title.setText("新建计划");
        rightMenu.setFontAwesomeIcon(FontAwesome.FA_CHECK);
    }



    @OnClick(R.id.tv_plan_create_pushObject)
    public void onClick() {
        //点击推送对象 选择人员
        List<String> pushObject= new ArrayList<>();
        pushObject.add("祁浩");
        pushObject.add("杨毅");
        pushObject.add("丁心林");
        pushObject.add("任宇");
        pushObject.add("张欣");
        pushObject.add("陈汶卓");


             DialogUtil.getInstance().multiChoice("推送对象", pushObject.toArray(new String[6]), null, new DialogUtil.OnDialogActionListener() {
                @Override
                public void onPositiveActionClicked(DialogFragment fragment) {
                    SimpleDialog dialog = (SimpleDialog) fragment.getDialog();

                }

                @Override
                public void onNegativeActionClicked(DialogFragment fragment) {

                }
            }).show(getSupportFragmentManager(),null);
    }


    @Override
    protected void onRightMenuClick(View view) {
        super.onRightMenuClick(view);
        ToastUtil.showShort(ctx, "点了确认按钮");
    }
}
